// import  { Suspense } from 'react'
// import { Route, Routes } from 'react-router-dom'
// import LayOut from './pages/LayOut/LayOut'
// import LoginIndex from './pages/LoginIndex/LoginIndex'
// import NotFound from './pages/NotFound/NotFound'
import routes from './routes'
import { useRoutes } from 'react-router-dom'
export default function App() {
  return useRoutes(routes)
  // return (
    // <Routes>
    //   <Route path="/" element={<LayOut />} />
    //   <Route path="/login" element={<LoginIndex />}></Route>
    //   {
    //     routes.map((route) => {
    //       return <Route key={route.path} path={route.path} element={<route.element/>}></Route>
    //     })
    //   }
    //   <Route path="*" element={<NotFound />}></Route>
    // </Routes>
  //   <Suspense fallback={
  //     <div>加载中...</div>
  //   }>
  //     {authRoutes}

  //   </Suspense>
  // )
}
